import publicStore from './pubilcModule';
const state = {
    //教师姓名
    teacher_name: '',
};

const getters = {
    table_ct_seach: (state) => {
        let value = {
            tcname: state.teacher_name,
            sex: publicStore.state.input_sex,
            class: publicStore.state.input_class,
            grade: publicStore.state.input_grade,
            school: publicStore.state.autocomplete_school,
            subject: publicStore.state.input_subject,
            testValueArray: publicStore.state.input_testValueArray,
            //分页
            pageSize: publicStore.state.pagination_pageSize,
            pageNum: publicStore.state.pagination_pageNum,
        };
        return value;
    },
};

const mutations = {
    setTeacher_name(state, value) {
        state.teacher_name = value
    },
    //重置
    setTeacher_Reset(state) {
        state.teacher_name = "";
    }
};

const actions = {
    reset(context) {
        //教师名字重置
        context.commit('setTeacher_Reset');
        //公共模块
        context.commit('pubilcModule/setReset', {}, { root: true });
    }

};
export default {
    namespaced: true,
    state,
    getters,
    mutations,
    actions
}